<?php 
	$action=$_GET['action'];
	if($action=="edit"){
		$id= $_GET['txtid'];
		$fname=$_POST['txtfname'];
		$lname=$_POST['txtlname'];
		$email=$_POST['email'];
		$name=$_GET['txtuser'];
		$pass=$_GET['txtpass'];
		include "connection.php";
		$sql="UPDATE users SET username=?,password=? where id=?";
		$stmt=sqlsrv_query($con,$sql,array($name,$pass,$id));
		sqlsrv_query($con,$sql,array($name,$pass,$id));
		sqlsrv_free_stmt($stmt);
		sqlsrv_close($con);
		header("location:index.php");	
	}
?>